const fs = require('fs');
const read = fs.createReadStream("凉州词.txt",
    { highWaterMark: 24 });
read.setEncoding("utf8")    //设置编码格式￼
read.on('data', function (chunk) {
    console.log(chunk.toString());
    // 暂停2秒，再继续读取数据￼
    read.pause();
    setTimeout(function () {
        read.resume();
    }, 2000);
});
// 流读取完毕时触发close事件￼
read.on("close", function () {
    console.log("读取完毕");
})

